<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
		<meta http-equiv="description" content="This is my page" />
		
		<link href="<%=path %>/css/layout.css" type="text/css" rel="stylesheet" />
		
		<script language="JavaScript" src="<%=path %>/js/public.js" type="text/javascript"></script>
		<script type="text/javascript">
	        function buy1(goodsKucun)
	        {
	                  alert("请先登录");
	            if(document.buy.quantity.value=="")
	            {
	                alert("请输入购买数量");
	                return false;
	            }
	            if(document.buy.quantity.value>goodsKucun)
	            {
	                alert("库存不足");
	                return false;
	            }
	            
	            document.buy.submit();
	        }
	    </script>
	</head>

	<body >
	<div class="container">
		<jsp:include flush="true" page="/qiantai/inc/incTop.jsp"></jsp:include>

		<div class="row">
			<!--左边的 -->
			<div class="content col-sm-3">


				<div class="panel panel-primary">
					<div class="panel-heading">
						<h3 class="panel-title">手机品牌</h3>
					</div>
					<div class="panel-body">
					</div>
				</div>

			</div>
			<!--左边的 -->
			<div class="content col-sm-6">
					<div class="panel panel-primary" style="height: 407px;">
					<div class="panel-heading">
						<h3 class="panel-title">详情</h3>
					</div>
					<div class="panel-body">
							  	<form action="<%=path %>/addToCart.action" method="post" name="buy">
                                  <table border="0" cellpadding="6">
                                      <tr><td width="30"></td><td style="font-size: 11px;">品名：</td><td style="font-size: 11px;"></td></tr>
                                      <tr><td width="30"></td><td style="font-size: 11px;">简介：</td><td style="font-size: 11px;"></td></tr>
                                      <tr><td width="30"></td><td style="font-size: 11px;">价格：</td><td style="font-size: 11px;"></td></tr>
                                      <tr><td width="30"></td><td style="font-size: 11px;">库存：</td><td style="font-size: 11px;"></td></tr>
                                      <tr><td width="30"></td><td style="font-size: 11px;">购买数量：</td><td style="font-size: 11px;"><input type="text" name="quantity" value="1" size="8" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"/></td></tr>
                                      <tr><td width="30"></td><td style="font-size: 11px;"><input type="hidden" name="goodsId" value=""/><img onclick="buy1()" src="<%=path %>/img/icon_buy.gif"/></td><td style="font-size: 11px;"></td></tr>
                                  </table>
                            </form>
		             </div>
		             </div>
		             </div>
		        <div class="content col-sm-3">
				<div class="panel panel-primary">
					<div class="panel-heading">
						<h3 class="panel-title">用户登录</h3>
					</div>
					<div class="panel-body">
						<jsp:include flush="true" page="/qiantai/userlogin/userlogin.jsp"></jsp:include>
					</div>
				</div>
				<div class="panel panel-primary">
					<div class="panel-heading">
						<h3 class="panel-title">网站公告</h3>
					</div>
					<div class="panel-body">
					</div>
				</div>
			</div>

			<div style="clear: both"></div>
			<!-- 右边的用户登录。留言。投票 -->
		</div>
		
		<div class="foot">
		   <jsp:include flush="true" page="/qiantai/inc/incFoot.jsp"></jsp:include>
	    </div>
	</body>
</html>
